#ifndef CBE_H
#define CBE_H
/*
 * cbe.h defines the required structures
 * for event transfer between INMS client and 
 * server. 
 * 
 * The data format is based on the Common Base Event
 * Specification from IBM dated 01.05.2004.
 * 
 * For further details refer to the links below
 * http://www.ibm.com/developerworks/library/specification/ws-cbe/
 * http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/
 *                 index.jsp?topic=/com.ibm.websphere.express.doc/
 *                 info/exp/ae/rtrb_cbestructure.html 
 */

#define STRING_SIZE 256   /* defines the maximum length of a string */
#define STRING_SHORT 20
#define STRING_ID 128    /* max length of string used as identifiers */  
#define STRING_MSG 1024 

typedef struct {
  char loc[STRING_SIZE];
  char loc_type[STRING_SIZE];
  char app[STRING_SIZE];
  char comp[STRING_SIZE];
  char sub_comp[STRING_SIZE];
  char comp_id_type[STRING_SIZE];
  char proc_id[STRING_SIZE];
  char thread_id[STRING_SIZE];
  char comp_type[STRING_SIZE];
}comp;

typedef struct {
  char version[STRING_SHORT];
  char local_id[STRING_ID];
  char global_id[STRING_ID];
  struct tm *timestamp;
  short severity;
  short priority;
  struct comp *rep_comp;
  struct comp *src_comp;
  char msg[STRING_MSG];
}event;

#endif
